export default {
  install(app) {
    const requireApiModules = import.meta.glob('@/api/**/*.js', { eager: true })
    for (const path in requireApiModules) {
      if (path === '/src/api/request.js') continue
      const module = requireApiModules[path].default
      app.config.globalProperties.$apis = {
        ...app.config.globalProperties.$apis,
        ...module
      }
    }
    window.$apis = app.config.globalProperties.$apis
  }
}
